3.1561 \(\int \left (a+\frac{b}{x}\right )^2 x \, dx\)

Optimal. Leaf size=22 \[ \frac{a^2 x^2}{2}+2 a b x+b^2 \log (x) \]

[Out]

2*a*b*x + (a^2*x^2)/2 + b^2*Log[x]

_______________________________________________________________________________________

Rubi [A]  time = 0.0268559, antiderivative size = 22, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.182 \[ \frac{a^2 x^2}{2}+2 a b x+b^2 \log (x) \]

Antiderivative was successfully verified.

[In]  Int[(a + b/x)^2*x,x]

[Out]

2*a*b*x + (a^2*x^2)/2 + b^2*Log[x]

_______________________________________________________________________________________

Rubi in Sympy [F]  time = 0., size = 0, normalized size = 0. \[ a^{2} \int x\, dx + 2 a b x + b^{2} \log{\left (x \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((a+b/x)**2*x,x)

[Out]

a**2*Integral(x, x) + 2*a*b*x + b**2*log(x)

_______________________________________________________________________________________

Mathematica [A]  time = 0.00190614, size = 22, normalized size = 1. \[ \frac{a^2 x^2}{2}+2 a b x+b^2 \log (x) \]

Antiderivative was successfully verified.

[In]  Integrate[(a + b/x)^2*x,x]

[Out]

2*a*b*x + (a^2*x^2)/2 + b^2*Log[x]

_______________________________________________________________________________________

Maple [A]  time = 0.003, size = 21, normalized size = 1. \[ 2\,abx+{\frac{{a}^{2}{x}^{2}}{2}}+{b}^{2}\ln \left ( x \right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((a+b/x)^2*x,x)

[Out]

2*a*b*x+1/2*a^2*x^2+b^2*ln(x)

_______________________________________________________________________________________

Maxima [A]  time = 1.43738, size = 27, normalized size = 1.23 \[ \frac{1}{2} \, a^{2} x^{2} + 2 \, a b x + b^{2} \log \left (x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((a + b/x)^2*x,x, algorithm="maxima")

[Out]

1/2*a^2*x^2 + 2*a*b*x + b^2*log(x)

_______________________________________________________________________________________

Fricas [A]  time = 0.223945, size = 27, normalized size = 1.23 \[ \frac{1}{2} \, a^{2} x^{2} + 2 \, a b x + b^{2} \log \left (x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((a + b/x)^2*x,x, algorithm="fricas")

[Out]

1/2*a^2*x^2 + 2*a*b*x + b^2*log(x)

_______________________________________________________________________________________

Sympy [A]  time = 1.03465, size = 20, normalized size = 0.91 \[ \frac{a^{2} x^{2}}{2} + 2 a b x + b^{2} \log{\left (x \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((a+b/x)**2*x,x)

[Out]

a**2*x**2/2 + 2*a*b*x + b**2*log(x)

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.221837, size = 28, normalized size = 1.27 \[ \frac{1}{2} \, a^{2} x^{2} + 2 \, a b x + b^{2}{\rm ln}\left ({\left | x \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((a + b/x)^2*x,x, algorithm="giac")

[Out]

1/2*a^2*x^2 + 2*a*b*x + b^2*ln(abs(x))